﻿using BrnMall.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace QiDong.PC.Api.AppCode
{
    public class WebUtil
    {
        public static string Request(string url)
        {
            return WebHelper.GetRequestData(url, "GET", "");
        }

        public static string RequestToJson(string actionUrl)
        {
            return Request(string.Format("{0}{1}", ApiConfig.API_DOMAIN, actionUrl));
        }

        public static string RequestToJsonp(string actionUrl, string callback)
        {
            var json = Request(string.Format("{0}{1}", ApiConfig.API_DOMAIN, actionUrl));
            return string.Format("{0}({1})", callback, json);
        }
    }
}